#ifndef CONTEXTMENUMANAGER_H
#define CONTEXTMENUMANAGER_H

#include <QMap>

QT_BEGIN_NAMESPACE
class QMenu;
class QAction;
QT_END_NAMESPACE

enum ContextMenuTarget
{
	RelationMenu = 1,
	ClassMenu = 2,
	ToClassMenu = 4,
	FromClassMenu = 8
};

class ContextMenuManager : QMap<ContextMenuTarget, QMenu*>
{
private:
	static ContextMenuManager _instance;
	QAction* _deleteAction;

	ContextMenuManager(void);
	~ContextMenuManager(void);
	
	QMenu* createContextMenu(ContextMenuTarget targetType);
public:
	static ContextMenuManager& instance() { return _instance; }
	QAction* deleteAction();
	QMenu& get(ContextMenuTarget targetType);
};

#endif // CONTEXTMENUMANAGER_H